<?phpnamespace app\common\model;class BannerLinkModel extends CommonModel{    protected  $name = 'banner_link_url';    protected  $pk   = 'link_url_id';    /**     * 模型写入前事件（钩子函数）     */    public static function onBeforeInsert($model)    {        $model->set("add_time", date('Y-m-d H:i:s'));        $model->set("add_ip", request()->ip());    }}